/*******************************************************************************
 * Copyright (c) 2008 Sylvain Sicard.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser Public License v2.1
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * 
 * Contributors:
 *     Noel De Palma - initial API and implementation
 ******************************************************************************/
package fr.jade.service.nodes.allocator;

/**
 * Exception for resource allocation.
 * 
 * @author Noel De Palma
 * @contact noel.depalma@inrialpes.fr
 */
public class AllocatorException extends Exception {

  private static final long serialVersionUID = 1L;
  Exception                 nested_exception = null;

  /**
   * Create a nested exception.
   * 
   * @param s
   *          Comment associtaed with the exception
   * @param e
   *          Nested exception
   */
  public AllocatorException(String s, Exception e) {
    super(s);
    nested_exception = e;
  }

  /**
   * Create an exception
   * 
   * @param s
   *          Comment associtaed with the exception
   */
  public AllocatorException(String s) {
    super(s);

  }

  /**
   * Return the nested exception associated with an exception
   * 
   * @return The nested exception
   */
  public Exception getNestedException() {
    return nested_exception;
  }

}
